package com.way.capture;

import android.app.Application;
import android.content.Intent;

import com.squareup.leakcanary.LeakCanary;
import com.tencent.bugly.crashreport.CrashReport;
import com.way.capture.service.ShakeService;

/**
 * Created by android on 16-2-4.
 */
public class App extends Application {
    private static App mApplication;

    public static Application getContext() {
        return mApplication;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mApplication = this;
        //Bugly
        CrashReport.initCrashReport(this, BuildConfig.BUGLY_APPID, BuildConfig.DEBUG);

        //LeakCanary
        LeakCanary.install(this);
        startService(new Intent(this, ShakeService.class));
    }

    @Override
    public void onTrimMemory(int level) {
        super.onTrimMemory(level);
    }
}
